function pripremiZaOcjenu(object){
	var image=object.id;
	/*var current=image.charAt(image.length-1);*/
	var current=image.substring(image.lastIndexOf('_')+1);
	var imageBase = image.substring(0,image.lastIndexOf('_')+1);
	var urlBase = object.src.substring(0,object.src.lastIndexOf('/'));
	//alert('image'+image+' current'+current+'imageBase = '+imageBase);
	for(var i=1;i<=10;i++){
		if(i<=current){
			document.getElementById(imageBase+i).src=urlBase+"/starActive.gif";
		}else{
			document.getElementById(imageBase+i).src=urlBase+"/starInactive.gif";
		}
	}
	return true;
}
function vratiUPrethodnoStanje(object, valueId){
	var image=object.id;
	/*var current=image.charAt(image.length-1);*/
	var current=image.substring(image.lastIndexOf('_')+1);
	var imageBase = image.substring(0,image.lastIndexOf('_')+1);
	var urlBase = object.src.substring(0,object.src.lastIndexOf('/'));
	
	//alert('imageBase = '+imageBase);
	var rate = new Number(document.getElementById(valueId).value);
	for(var i=1;i<=10;i++){
		if(i<=rate){
			document.getElementById(imageBase+i).src=urlBase+"/starActive.gif";
		}else{
			document.getElementById(imageBase+i).src=urlBase+"/starInactive.gif";
		}
	}
	return true;
}